Once the pellets are in, how does the agent inspect blend share online?
This is not a batch of photos sent off for later analysis. Vision sits inside one spot-check cycle. After three fertilizer grades hit the tray, the station runs six steps.
- Manual load.The operator pours the three grades onto the vibrating tray. Premixing and random placement are allowed. No photo yet.
- Vibrate flat for 3 s.The electromagnetic tray runs for three seconds and spreads the pellets into a single layer. Stacking is not allowed, and the camera does not fire while the tray is shaking.
- Stop, then fire the photo signal.At three seconds the tray stops on its own. Only after the photo-eye / done signal is in does the camera get a soft trigger.
- Top-down capture and inference.A 5 MP camera looks down from a 500 mm working distance. VisionAgent segments the three classes and converts pixel area into blend share.
- OK / NG out.If every class sits inside the recipe band, the tower turns green. If any class is out, red plus a buzzer. The HMI shows the same shares.
- Tilt dump.After the call is latched, a cylinder tilts the tray 35°–45° away from the cabinet and gives a 1–2 s shake. Pellets slide into a wide hopper. The tray must lock level before the next cycle.
| Layer | What is on it | Duty |
|---|---|---|
| Flatten and dump | Electromagnetic vibrating tray, tilt cylinder, level lock, wide hopper | 3 s to a single layer; after the call, tilt + a short shake; lock level before the next check |
| Optics | 5 MP camera, 16 mm lens, four high white bar lights | Look straight down on the tray; bars sit outside the view cone and rake the full disk, clear of the lens |
| Vision software | VisionAgent 3.0, recipe limits, HMI board | Class segmentation, area share, OK / NG, archive the raw frame |
| Signals | Photo-eye, tower light, buzzer | Photo signal after the tray stops; green to pass, red to alarm |
Vision does not change the pour. What it adds is the judgment and the dump in the middle: make every pellet visible in a single layer, turn pixel area into three shares, then hand the call to the light and the hopper.
Inside the agent
A tensor graph puts the inspection chain on one canvas
VisionAgent does not split capture, training, and judgment into three tools. After the stop-vibrate signal, the industrial camera, preprocess, semantic segmentation, event probe, and state machine sit on one tensor graph. Drag the nodes into place. A recipe change is a limit. You do not stand up a second project.
Each operator has a fixed duty in the library. On this tray, segmentation emits classes 1 / 2 / 3. The event probe looks for “object present,” not a defect.
- Industrial camera:one node per station. After the tray stops, it emits a top-down frame on the capture cycle and hands it to preprocess.
- Preprocess:denoise, enhance, and normalize for this station, then into semantic segmentation.
- Semantic segmentation:the station’s transferred model marks fertilizer classes 1 / 2 / 3 and emits class, location, and confidence.
- Event probe:watch the masks for state change and raise an “object present” event for each class.
- Result merge:turn three pixel areas into blend share and call OK / NG against the recipe limits.
- State machine:track this tray’s three detections (E0 / E1 / E2) and pin the call to this cycle.
A vision foundation model: few-shot, strong transfer
The three grades split on color and shape. There is no crack-like geometry you can write as a rule. Change the angle or the light, and the same pile looks like another object. The old small-model path wants tens of thousands of frames and months of training. Spot-check recipes change too often to wait.
Label three classes with few shots, then iterate online
At kickoff, pick representative single-layer frames from the floor, label them 1 / 2 / 3 on the annotation page, run few-shot transfer, then review each mask: does it hug the pellets, and did it eat the tray.
When a new grade or a new light shows up outside the first set, keep the frame, add labels, and iterate. You do not rebuild a dataset from scratch. Camera in and the tensor graph stay put.
Detection conditions for the three grades
In the GPU event orchestrator, each class gets an “object present” rule: target class 1, 2, or 3; region is the full frame; no crop. State-machine slots E0 / E1 / E2 line up with those three events. The same condition on all three classes is what makes the area shares comparable.
Process premise
Why the tray has to be flat first
Share is pixel area: Pᵢ = Sᵢ / (S₁+S₂+S₃) × 100%. The camera sees a projection, not a weight. Stack pellets and the lower layer disappears. The areas distort, and the shares are unusable.
Vibration is not optional. This station locks flatten time at 3 seconds and stops on its own. The camera does not fire while the tray is shaking. The only legal photo is after the tray has stopped and is in place.
The OK rule is just as hard: every class must sit inside its recipe limits before the light goes green. Any class out of band is red plus a buzzer. Limits are set on the HMI. Change the recipe, change the numbers. Do not rebuild the optics.
One agent makes the call
Class and area share live on the same box
The station carries one edge agent. Camera control, three-class segmentation, area share, recipe compare, and the tower all run here. The commissioning crew does not bounce between a capture tool, a training platform, and a separate judge.
That is not “shoot first, compute later on a PC.” The stop-vibrate signal comes in; capture, segment, share, and the light are one chain. The raw frame and the result are archived together, so a review can still point at this tray.
Optics and dump
Look down on the full tray; rake light from outside the view
The color split between the three grades needs even light. The camera hangs over the tray at 500 mm. Four white bar lights sit high on the gantry, outside the view cone, and rake the full disk. The bars stay out of the frame and out of the lens.
| Item | Spec | Qty | Use |
|---|---|---|---|
| Industrial camera | 5 MP | 1 | Top-down capture |
| Industrial lens | 16 mm focal length | 1 | Match field of view to working distance |
| White bar lights | Bright, even bars | 4 | Rake the full disk from outside the view; kill shadows |
| Electromagnetic vibrating table | Tray + vibration control | 1 | Flatten 3 s; dump shake 1–2 s |
| Photoelectric sensor | Through-beam / retro | 1 | Tray stopped and in place; fire the photo signal |
| Tilt cylinder + level lock | 35°–45° tilt | 1 | Dump after the call; lock level before the next check |
| Hopper | Wide, deep mouth | 1 | Opposite the cabinet; covers the dump lip |
| Tower + buzzer | Industrial stack | 1 | OK green / NG red + alarm |
After the call, the tray dumps itself
Cycle time dies on dump. Scraping by hand is slow and mixes buckets. The semi-auto setup hangs dump off the call: a cylinder lifts the tray, tilts 35°–45° away from the cabinet, the table gives a 1–2 s shake, and pellets slide into a wide, deep hopper. The mouth covers the dump lip so nothing lands on the frame. Optics and gantry stay put; only the tray tilts. Until it locks level again, the next vibrate and the next photo are blocked.
Hardware (set once)
- Gantry, 500 mm working distance, four high bar lights
- Vibrating tray and the 3 s flatten timing
- Tilt cylinder, level lock, wide hopper
- Photo-eye, tower, buzzer
Software (changed on the floor)
- Three-class segmenter and recipe limits
- Stop → photo → judge tensor graph
- OK / NG light and the dump-enable bit
- Raw frame, shares, and result archive
What the model sees
Few-shot labels for three classes, then area
The three grades split on color and shape. There is no crack-like geometry you can write as a rule. On the agent, typical single-layer samples are labeled 1 / 2 / 3, a few-shot transfer is run, then each frame is checked: does the mask hug the pellets, and did it eat the tray background.
Once the masks hold, area share is a pixel count. Pink / cyan / orange map to classes 1 / 2 / 3. The board shows per-class area and blend share together.
What the board shows
The operator sees shares and a light
The operator does not read masks. The board shows three shares; the station shows green or red. The light and the numbers point at the same tray. Open the raw frame and the mask only when you need a review.
I/O is locked in that order: load does not fire a photo; vibrate for 3 s, then stop; the photo-eye fires the capture signal; the agent soft-triggers; tilt is allowed only after the call. A photo during shake, or another pour before level lock, is blocked.
How repeatability is measured
Static 0.3%–0.6%, dynamic 2%–3%
Repeatability is the range of each class share: max−min across frames of the same pile. Static keeps the pile still and shoots consecutive frames. Dynamic empties and refills, or places the pile again, then measures. The hero numbers are those ranges: static 0.3%–0.6%, dynamic 2%–3%.
Every figure below is the “class 1 / 2 / 3 blend share” read off the same board. Nothing was recomputed on the side.
| Sample | Class 1 share | Class 2 share | Class 3 share | Range (three classes) |
|---|---|---|---|---|
| Set 1, frame 1 | 33.71% | 22.10% | 44.19% | 0.12% / 0.12% / 0.12% |
| Set 1, frame 2 | 33.59% | 22.11% | 44.29% | |
| Set 1, frame 3 | 33.71% | 21.99% | 44.31% | |
| Set 2, frame 1 | 37.88% | 19.36% | 42.76% | 0.42% / 0.57% / 0.43% |
| Set 2, frame 2 | 37.89% | 19.78% | 42.33% | |
| Set 2, frame 3 | 37.47% | 19.93% | 42.60% | |
| Set 3, frame 1 | 36.71% | 17.89% | 45.40% | 0.26% / 0.07% / 0.33% |
| Set 3, frame 2 | 36.97% | 17.96% | 45.07% | |
| Set 3, frame 3 | 36.86% | 17.92% | 45.22% | |
| Static call | Three-class ranges sit in 0.3%–0.6% (Set 2 at 0.57% is the measured ceiling) | |||
| Sample | Class 1 share | Class 2 share | Class 3 share |
|---|---|---|---|
| Dynamic 1 | 44.99% | 23.01% | 32.00% |
| Dynamic 2 | 46.25% | 23.17% | 30.58% |
| Dynamic 3 | 46.78% | 20.24% | 32.98% |
| Dynamic 4 | 47.44% | 21.48% | 31.10% |
| Range | 2.45% | 2.93% | 2.40% |
The station answers one concrete question: three grades in one pile, is the blend inside the recipe. The camera is there to see a single layer. The agent turns pixels into share. The light and the hopper hand the call back to the floor.
The static range says consecutive shots of the same tray hold. The dynamic range says a refill still stays inside 3%. If flatten fails, neither number is worth discussing.
A vision model, few-shot labels for three classes;
a vision agent, share, recipe, and OK / NG on one chain;
flatten first, then shoot, tilt-dump, close the spot-check loop.